package com.hxzy.common.vo;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hxzy.common.core.domain.entity.PzServiceItem;
import lombok.Getter;
import lombok.Setter;

import java.util.List;


@Getter
@Setter
public class PageVO<T> {

    /**
     * 总行数
     */
    private Long totalRecord;

    /**
     * 当前页数据
     */
    private List<T> records;


    public static <T> PageVO<T> pageVo(IPage<T> iPage) {
        PageVO<T> pageVo = new PageVO<T>();
        pageVo.setTotalRecord(iPage.getTotal());
        pageVo.setRecords(iPage.getRecords());
        return pageVo;
    }
}
